home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
c
/
mcmm.exe
/
MCS_MENU.H
< prev
next >
Wrap
C/C++ Source or Header
|
1992-10-02
|
6KB
|
194 lines
/***********************************************/
/* */
/* Header File for MCs Menu Maker */
/* */
/***********************************************/
/***********************************************/
/* */
/* Define BIOS and ASCII key definitions */
/* */
/***********************************************/
#define UP 72
#define DOWN 80
#define RIGHT 77
#define LEFT 75
#define RETURN 28
#define ESCAPE 1
#define TAB 15
#define ASCIIESCAPE 27
#define ASCIITAB 9
#define ASCIIDEL 83
#define ASCIIBACK 8
#define ASCIIRETURN 13
#define NULL 0L
/***********************************************/
/* */
/* Define function prototypes */
/* */
/***********************************************/
void screen_setup(void);
void menu_heading(void);
void menu_clear(int);
void menu_display(int);
int menu_poll(void);
void menu_declare(char *);
void menu_right(void);
void menu_left(void);
void menu_down(void);
void menu_up(void);
void menu_move(void);
void menu_bar_highlight(int);
int menu_selection_plot(int,int);
int menu_action(void);
void menu_error(int);
void menu_attrib_type(char *);
void window_declare(char *,int,int,int,int,char *);
void window_display(int,int,int);
int window_info(int,int *);
void win_item_text(int,char unsigned*,int,int,int *,char *);
void win_item_switch(int,char unsigned*,int,int,int *,int);
void win_set_item(int,int,int long);
int win_storage(int);
int window_item_update(int);
int win_do_text(int,int *);
int win_do_switch(int,int *,int);
void win_do_number(int,int,int);
void win_item_number(int,char unsigned*,int,int,int *,int);
void win_item_boolean(int,char unsigned*,int,int,int *,int);
void win_item_file(int,char unsigned*,int,int,int *,int,int);
int win_do_file(int,int *,int);
int long win_get_item(int,int);
void fastprint(int,char unsigned *,int,int,char unsigned,char unsigned);
void win_plot_rect(int,char unsigned *,int,int);
void win_item_char(int,char unsigned*,int,int,int *,char *,int,int);
int win_do_char(int,int *,int);
void stringprint(int,char unsigned*,int,int,char *,char unsigned);
void win_item_accept(int,char unsigned*,int,int,int *,char *,int);
int win_do_accept(int,int *,int);
void win_icon_shadow(int,char unsigned*,int,int);
int window_show(int,int,int);
void window_help_display(int,int);
void window_help_declare(int,int,char *);
void menu_help_display(int,int);
void menu_help_declare(int,int,char *);
void win_refresh();
int error_handler(int,int,int,int);
void menu_kill(void);
/***********************************************/
/* */
/* The menu definition structure */
/* */
/***********************************************/
struct menu_def {
char *menu_options;
char *menu_pic;
int menu_x;
int menu_height;
int menu_width;
int menu_highlight;
char menu_links[23];
struct menu_def *next;
};
extern struct menu_def *start;
extern struct menu_def *end;
struct menu_help_def {
char *help_string;
int number;
int item;
struct menu_help_def *next;
};
extern struct menu_help_def *startmh;
extern struct menu_help_def *endmh;
struct window_help_def {
char *help_string;
int number;
int item;
struct window_help_def *next;
};
extern struct window_help_def *startwh;
extern struct window_help_def *endwh;
/***********************************************/
/* */
/* The window definition structure */
/* */
/***********************************************/
struct window_def {
char *window_pic;
int window_x;
int window_y;
int window_xoff;
int window_yoff;
char *window_info;
char *window_storage;
struct window_def *next;
};
extern struct window_def *startw;
extern struct window_def *endw;
/***********************************************/
/* */
/* Global variables */
/* */
/***********************************************/
extern int menu_position; // returned value for menu selected
extern int menu_option; // returned value for menu option selected
extern int menu_fore_color; // menu/window foreground color
extern int menu_back_color; // menu/window background color
extern int menu_highlight_color; // menu/window highlight color
extern char menu_buffer1[4096]; // buffer to save screen behind menu
extern char menu_buffer2[4096]; // buffer to save screen behind window
extern int menu_titles; // Used to check the number of titles
extern char *menu_bar_options; // The menu bar option headings
extern int menu_menus; // Used to check the number of menus
extern int window_windows; // Used to check the number of windows
extern int window_x; // X offset for displayed window
extern int window_y; // Y offset for displayed window
extern int win_attr; // Used to hold the windows main color
extern int win_out; // Used to get us out of the menu system
extern char unsigned far *win_text_screen; // Contains the text screen address
extern int window_open; // Number of open window
extern int window_item; // Number of selected window item
extern int menu_help_color; // Colour for help text
extern int win_accept; // Currently active window
extern int win_default; // If 1 a gadget reads from its workspace